<template>
	<view>
		<!-- 正文 -->
		<view v-if="!networkStatus">
			<!-- <nonetword @onclick="getList"></nonetword> -->
		</view>
		<view v-if="networkStatus">
			<!-- <tui-skeleton v-if="skeletonShow" backgroundColor="#fafafa"></tui-skeleton> -->
			<hx-navbar :config="navConfig"></hx-navbar>
			
			<view class="main-body-view" :style="{top:statusBarHeight}">
				<view class="tip-txt" >注：带* 的必填，其他的选填</view>
				<!-- <scrooll-view scroll-y  :style="'height: '+height+'rpx;'"> -->
					<!-- <view class="group">
						<view class="title">邀请码</view>
						<input class="u-input" focus placeholder="请输入邀请码" v-model="data.list.invite_code"/>
					</view> -->
					<view class="group">
						<view class="title"><text class="mast"> *</text>单位名称</view>
						<input class="u-input"  placeholder="请输入单位名称" v-model="data.list.company_name"/>
					</view>
					<!-- <view class="">
						<view class="title"><text class="mast"> *</text>公司/店铺类型</view>
						<view class="u-checked">
							
							<view class="store_type" v-for="item,index in company_type"  @tap="checkedStoreType(item)">
								<view><text  :class="checkIndex == item.val?'checked-red iconfont':'iconfont'">{{checkIndex==item.val?'&#xe61d;':'&#xe638;' }}</text></view>
								<view>{{item.name}}</view>
							</view>
						</view>
					</view> -->
					<view class="group">
						<view class="title"><text class="mast"> *</text>联系人名称</view>
						<input class="u-input"  placeholder="请输入联系人名称"  v-model="data.list.contact_name"/>
					</view>
					<view class="group">
						<view class="title"><text class="mast"> *</text>联系电话</view>
						<input class="u-input"  placeholder="请输入联系电话"  v-model="data.list.mobile"/>
					</view>
					
					<!-- <view class="group">
						<view class="title">法人身份证</view>
						<input class="u-input" focus placeholder="请输入法人身份证号码"  v-model="data.list.id_card"/>
					</view> -->
					<view class="group">
						<view class="title">电子邮箱</view>
						<input class="u-input"  placeholder="请输入电子邮箱地址"  v-model="data.list.email"/>
					</view>
					<view class="group">
						<view class="title">
							<text class="mast"> *</text>地址
						</view>
						<picker :value="value" mode="multiSelector" @change="picker" @columnchange="columnPicker" :range="multiArray" >
							<text style="font-size: 24rpx;line-height: 51rpx;">{{data.text}}</text>
						</picker>
						
					</view>
					<view class="group">
						<view class="title">
							<text class="mast"> *</text>详细地址
						</view>
						<view class="input">
							<input type="textarea" v-model="data.list.address" auto-height="true" placeholder="输入详细地址"></input>
						</view>
					</view>
					<!-- <view class="group">
						<view class="title">
							经营范围
						</view>
						<view class="input" style="width: 100%;">
							
								
							 <rudon-multiSelector welcome="请选择" :is_using_slot="false" :is_using_icon="true" :localdata="data.scopeList" @change="whenChanged"></rudon-multiSelector>
						</view>
					</view> -->
					<view class="group remove">
						<view  class="title1"><text class="mast"> *</text> 医疗机构执业许可证/诊所备案凭证</view>
						
					</view>
					<view class="tui-box-upload">
						<tui-upload :limit="2" :dirType="0" :userType="2"  :showType="true"  :serverUrl="serverUrl" @complete="result($event,'medical_certificate_image')" @remove="remove($event,'medical_certificate_image')"></tui-upload>
						<!-- <view class="group">
							<view class="title">有效时间</view>
							<picker  mode="date" :value="data.list.medical_certificate_time"  @change="bindDateChange($event,'medical_certificate_time')">
							    <view class="picker">
							       {{data.list.medical_certificate_time||'请选择'}}
							    </view>
							  </picker>
							
						</view> -->
						<view class="mast-text"><text class="mast"> *</text>(复印件盖公章)</view>
					</view>
					<view class="group remove">
						<view class="title1"><!-- <text class="mast"> *</text> -->营业执照</view>
						
					</view>
					<view class="tui-box-upload">
						<tui-upload :limit="1" :dirType="0" :userType="2" :serverUrl="serverUrl" @complete="result($event,'license_image')" @remove="remove($event,'license_image')"></tui-upload>
						<!-- <view>有效时间：长期</view> -->
						<view class="mast-text"><text class="mast"> </text>营利性单位需上传(复印件盖公章)</view>
					</view>
					
				<!-- 	
					<view class="group remove">
						<view class=""><text class="mast"> *</text>医疗器械经营许可证和第二类医疗器械经营备案凭证,三类证</view>
					
					</view>
					<view class="tui-box-upload">
						
						<tui-upload :limit="3" :dirType="0" :userType="2"  :showType="true"  :serverUrl="serverUrl" @complete="result($event,'business_certificate_image')" @remove="remove($event,'business_certificate_image')"></tui-upload>
						<view class="group">
							<view class="title">有效时间</view>
							<picker  mode="date" :value="data.list.business_certificate_time"  @change="bindDateChange($event,'business_certificate_time')">
							    <view class="picker">
							       {{data.list.business_certificate_time||"请选择，默认为'长期'有效"}}
							    </view>
							  </picker>
							
						</view>
					</view> -->
					
					
					<!-- <view class="group remove">
						<view class="">食品经营许可证</view>
					
					</view>
					<view class="tui-box-upload">
						<tui-upload :limit="2" :dirType="0" :userType="2" :serverUrl="serverUrl" @complete="result($event,'food_certificate_image')" @remove="remove($event,'food_certificate_image')"></tui-upload>
						<view class="group">
							<view class="title">有效时间</view>
							<picker  mode="date" :value="data.list.food_certificate_time"  @change="bindDateChange($event,'food_certificate_time')">
							    <view class="picker">
							       {{data.list.food_certificate_time||'请选择'}}
							    </view>
							  </picker>
							
						</view>
					</view> -->
					
					
					<view class="group remove">
						<view class="title1"><text class="mast"> *</text>采购人身份证(正反面)</view>
					
					</view>
					<view class="tui-box-upload">
						<tui-upload :limit="2" :dirType="0" :userType="2" :serverUrl="serverUrl" @complete="result($event,'id_card_image')" @remove="remove($event,'id_card_image')"></tui-upload>
						  <!-- <view class="mast"><text class="mast"> *</text></view> -->
						<view class="group">
							<view class="title"><!-- <text class="mast"> *</text> -->有效时间</view>
							<picker  mode="date" :value="data.list.id_card_time"  @change="bindDateChange($event,'id_card_time')">
							    <view class="picker">
							       {{data.list.id_card_time||'请选择'}}
							    </view>
							  </picker>
							
							<!-- <input class="u-input"  placeholder="请输入有效时间"  v-model="data.list.id_card_time"/> -->
						</view>
					</view>
					<!-- <view class="group remove">
						<view class="">采购委托书扫描件</view>
						
					</view>
					<view class="tui-box-upload">
						<tui-upload :limit="5" :dirType="0" :userType="2" :serverUrl="serverUrl" @complete="result($event,'letter_image')" @remove="remove($event,'letter_image')"></tui-upload>
						<view class="mast-text">(复印件盖公章)</view>
						<view class="group">
							<view class="title">有效时间</view>
							<picker  mode="date" :value="data.list.letter_time"  @change="bindDateChange($event,'letter_time')">
							    <view class="picker">
							       {{data.list.letter_time||'请选择'}}
							    </view>
							  </picker>
							<input class="u-input"  placeholder="请输入有效时间"  v-model="data.list.letter_time"/>
						</view>
					</view> -->
					<!-- <view class="group">
						<view class="title">采购员身份证号：</view>
						<input class="u-input"  placeholder="请输入身份证号"  v-model="data.list.id_card"/>
					</view>
					<view class="group">
						<view class="title">采购员姓名：</view>
						<input class="u-input"  placeholder="请输入姓名"  v-model="data.list.realname"/>
					</view> -->
					
					<view>
						
					</view>
					
				<!-- </scrooll-view> -->
					<view style="height: 200rpx;"></view>
				
			</view>
			<view style="height: 900rpx;"></view>
			<view class="foot-btn">
				<view class="btn" @click="applyFun">确定</view>
			</view>
			<!-- <view class="place-bottom"></view> -->
			<!-- <tui-modal :show="modal" @click="modalClick" @cancel="modalHide" content="确定清理缓存吗？" color="#333" :size="32" :button="modalButton" shape="circle"></tui-modal> -->
			<!-- 弹框 -->
			<tui-tips ref="toast"></tui-tips>
			<!-- 登录弹框 -->
			<uni-popup-vlogin id="popupvLogin" ref="popupvLogin" type="bottom" />
		</view>
	</view>
</template>
<script>
	import areaData from "@/packageAgent/city.js"
	import tuiUpload from '@/components/tui-upload/tui-upload'
	// 推广名片
	import _app from '@/js_sdk/QuShe-SharerPoster/util/QS-SharePoster/app.js';
	import rudonMultiSelector from '@/components/rudon-multiSelector/rudon-multiSelector';
	// import multiplePicker from '@/components/multiple-picker/multiple-picker';
	import {
		getSharePoster
	} from '@/js_sdk/QuShe-SharerPoster/util/QS-SharePoster/QS-SharePoster.js';

	import he from '@/utils/he.js'
	//公共底部组件引入 
	// import btabbar from '@/components/bottomtabbar.vue'
	// 公共底部
	// import btabbar from '@/components/indexBottomTable/bottomtabbar.vue'
	// import tuiListCell from "@/components/list-cell/list-cell"
	// import nonetword from '@/components/nonetword.vue'

	// import tuiModal from "@/components/modal/modal"
	import {
		mapGetters
	} from 'vuex';
	export default {
		data() {
			return {
				statusBarHeight: '',
				imageData: [],
				serverUrl: '',
				isTop: 0,
				heightVal: '-112rpx',
				height:'',
				//网络状态
				networkStatus: true,
				skeletonShow: true,
				fixedTop: 140,
				
				selectList:[],
				value: [19,0,0],//已选城市地址
				multiArray: [], //picker数据
				columnFirst:19,//默认选择的省份 这里默认选择广西
				columnsecond:null,
				checkIndex:3,
				assertUserId:'',//推广员邀请人id
				inviteUserId:'',//普通用户
				navConfig: {
					
					backbtn:{
						color: '#000',
					},
					backTxt:'返回',
					backgroundImg: 'https://xoimg.aiouning.com/static/LH_user_img/nav.png',
					// title: '申请入驻',
					color: '#fff',
					fontSize: 12,
					back: true,
					height: 175
				},
				scopes:[],
				
				company_type:[
					{
						val:0,
						name:'单体药店'
					},
					{
						val:1,
						name:'连锁总部'
					},
					{
						val:2,
						name:'商业公司'
					},
					{
						val:3,
						name:'诊所/卫生室/医院'
					},
					{
						val:4,
						name:'连锁加盟/直营'
					},
					{
						val:5,
						name:'医疗器械经营店'
					},
					
					
				],
				//接口数据
				data: {
					list:{
						company_name:'',
						mobile:'',
						contact_name:'',
						id_card:'',
						email:'',
						license_image:[],
						scopeIds:[],
						id_card_time:'',
						id_card_image:[],
						letter_image:[],
						business_certificate_image:[],
						realname:'',
						business_certificate_time:'',
						letter_time:'',
						medical_certificate_time:'',
						medical_certificate_image:[],
						food_certificate_time:'',
						food_certificate_image:[],
						
						
					},
					text:'请选择',
					//客服电话
					serviceMobile: '18677057271',
					//个人信息,
					userInfo: {
						nickname: '游客',
						face: '',
						signature: '点击昵称跳转登录/注册页',
						integral: 0,
						balance: 0,
						envelope: 0,
						exp: 0,
						upExp: 0,
						vipname: ''
					},
					scopeList:[
						
						{
							value: 0,
							text: "数学",
							is_selected: false,
						},
						
						
					],

				},
				headerPosition: "fixed",
				headerTop: null,
				statusTop: null,
				showHeader: true,
				// 推广名片
				hasLogin: false,
				poster: {},
				qrShow: false,
				canvasId: 'default_PosterCanvasId',

				modal: false,
				//确认弹框
				modalButton: [{
					text: "取消",
					type: 'gray'
				}, {
					text: "确定"
				}],
				qrUrl: '',
				// 节点
				//生成二维码地址
				qrImgHost: '',
				OSS_HOST: 'https://xoimg.aiouning.com/static/',
				// OSS_HOST:'../../static/',

			}
		},
		components: {
			// btabbar,
			// nonetword,
			// tuiModal,
			// tuiListCell,
			tuiUpload,
			rudonMultiSelector,
			// multiplePicker
			

		},
		computed: {
			...mapGetters(['netWorkType', 'loginStatus']),
			expup: function() {
				return parseInt(this.data.userInfo.exp / this.data.userInfo.upExp * 100)
			}
		},
		onPageScroll: function(e) {

			if (e.scrollTop > 100) {
				this.isTop = 1
			} else {
				this.isTop = 0
			}
		},
		//下拉刷新，需要自己在page.json文件中配置开启页面下拉刷新 "enablePullDownRefresh": true
		onPullDownRefresh() {
			setTimeout(function() {
				uni.stopPullDownRefresh();
			}, 1000);
		},
		onPageScroll(e) {
			//兼容iOS端下拉时顶部漂移
			this.headerPosition = e.scrollTop >= 0 ? "fixed" : "absolute";
			this.headerTop = e.scrollTop >= 0 ? null : 0;
			this.statusTop = e.scrollTop >= 0 ? null : -this.statusHeight + 'px';
		},
		onLoad(e) {
			let _this = this
			this.GetStatusBarHeight();
			this.statusHeight = 0;
			// #ifdef APP-PLUS
			this.showHeader = false;
			this.statusHeight = plus.navigator.getStatusbarHeight();
			// #endif
			if (!this.loginStatus) {
				store.dispatch('changeLogin', false)
			}
			this.qrImgHost = this.$service.getQrImgHost()
			//获取满屏高度
			uni.getSystemInfo({
				success: function(res) {
					// console.log('****高',res) px 
					_this.height = (res.screenHeight-100)*2 
					// _this.fixedTop = (res.screenHeight-568)+140
				}
			});
			this.assertUserId = uni.getStorageSync('assertUserId');
			this.inviteUserId = uni.getStorageSync('inviteUserId');
			console.log(this.assertUserId)
			this.serverUrl = this.$service.getImgHost()
			console.log(this.serverUrl,'*********')
			this.selectList=areaData.area
			this.multiArray = [
				this.toArr(this.selectList,1),
				this.toArr(this.selectList[19].children,2),
				this.toArr(this.selectList[19].children[0].children,3)
			]
			// this.getList();
		},
		onReady() {
			//此处，演示,每次页面初次渲染都把登录状态重置
			// uni.setStorage({
			// 	key: 'UserInfo',
			// 	data: false,
			// 	success: function () {
			// 	},
			// 	fail:function(e){
			// 	}
			// });
		},
		onShow: function() {
			
			// this.heightVal='-'+(140+44-uni.getSystemInfoSync().statusBarHeight)+ 'px';
			// #ifdef MP-WEIXIN
			if (wx.hideHomeButton) {
				wx.hideHomeButton();
			}
			// #endif
			
			
		},
		filters: {
			iconFilters: function(x) {
				return he.decode(x);
			}
		},
		methods: {
			applyFun() {
				let _this = this;
				if(!_this.loginStatus){
					_this.$refs.popupvLogin.open()
				}
				if(!_this.data.list.company_name){
					uni.showToast({
						icon: 'none',
						title: '请输入公司名称'
					});
					return
				}
				if(!_this.data.list.mobile){
					uni.showToast({
						icon: 'none',
						title: '请输入联系电话'
					});
					return
				}
				let reg_tel = /^(13[0-9]|14[01456879]|15[0-3,5-9]|16[2567]|17[0-8]|18[0-9]|19[0-3,5-9])\d{8}$/;
				if(!reg_tel.test(_this.data.list.mobile)){
					uni.showToast({
						icon: 'none',
						title: '联系电话格式不正确'
					});
					return
				}
				if(!_this.data.list.contact_name){
					uni.showToast({
						icon: 'none',
						title: '请输入名称'
					});
					return
				}
				if(_this.data.list.medical_certificate_image.length<1){
					uni.showToast({
						icon: 'none',
						title: '请上传医疗机构执业许可证和诊所备案凭证复印件加盖公章'
					});
					return
				}
				// if(!_this.data.list.id_card){
				// 	uni.showToast({
				// 		icon: 'none',
				// 		title: '请输入法人身份证号'
				// 	});
				// 	return
				// }
				// if(!_this.data.list.business_certificate_time){
				// 	uni.showToast({
				// 		icon: 'none',
				// 		title: '请输选择经营许可证件的有效时间'
				// 	});
				// 	return
				// }
				// if(_this.data.list.license_image.length<=0){
				// 	uni.showToast({
				// 		icon: 'none',
				// 		title: '请上传营业执照'
				// 	});
				// 	return
				// }
				// if(_this.data.list.email == ''){
				// 	uni.showToast({
				// 		icon: 'none',
				// 		title: '请输入邮箱'
				// 	});
				// 	return
				// }
				// if(!_this.data.list.invite_code){
				// 	uni.showToast({
				// 		icon: 'none',
				// 		title: '请输入邀请码'
				// 	});
				// 	return
				// }
				// if(_this.data.list.business_certificate_image.length<=0){
				// 	uni.showToast({
				// 		icon: 'none',
				// 		title: '请上传经营许可证'
				// 	});
				// 	return
				// }
				if(_this.data.list.id_card_image.length<1){
					uni.showToast({
						icon: 'none',
						title: '请上传身份证件复印件正反面盖公章'
					});
					return
				}
				// if(!_this.data.list.id_card ){
				// 	uni.showToast({
				// 		icon: 'none',
				// 		title: '请输入采购员身份证号',
				// 	});
				// 	return
				// }
				// if(!_this.data.list.realname){
				// 	uni.showToast({
				// 		icon: 'none',
				// 		title: '请输入采购员真实姓名',
				// 	});
				// 	return
				// }
				
				let value = this.value
				let data={
						company_name:_this.data.list.company_name,//公司、门店
						mobile:_this.data.list.mobile,//公司联系电话
						contact_name:_this.data.list.contact_name,//公司联系人
						id_card:_this.data.list.id_card,
						email:_this.data.list.email,//邮箱
						license_image:_this.data.list.license_image,//营业执照
						invite_code:_this.data.list.invite_code,
						address:_this.data.list.address,
						business_certificate_image:_this.data.list.business_certificate_image,//二类证，三类证或经营备案等.
						id_card_image:_this.data.list.id_card_image,
						letter_image:_this.data.list.letter_image,//采购委托书
						realname:_this.data.list.realname,
						business_certificate_time:_this.data.list.business_certificate_time||'长期',
						id_card_time:_this.data.list.id_card_time,
						letter_time:_this.data.list.letter_time,
						company_type:_this.checkIndex||3,
						medical_certificate_time:_this.data.list.medical_certificate_time,
						medical_certificate_image:_this.data.list.medical_certificate_image,//诊所执业证
						food_certificate_time:_this.data.list.food_certificate_time,
						food_certificate_image:_this.data.list.food_certificate_image,//食品经营证
						assert_user_id:_this.assertUserId||'',//邀请人ID  扫码邀请
						invited_user_id:_this.inviteUserId||'',
					}
				if(JSON.stringify(this.value) !== '[]')
				{
					data.province_id=value[0]
					data.city_id=value[1]
					data.area_id=value[2]
					data.province_name=this.selectList[value[0]].label
					data.city_name=this.selectList[value[0]].children[value[1]].label
					data.area_name=this.selectList[value[0]].children[value[1]].children[value[2]].label
				}
				
				
				//提交ajax
				//console.log(1111)
				var opt = {
					url: '/User/businessAuth',
					data: data,
					success: function(res) {
						if (res.status == 1) {
							uni.showToast({
								icon: 'none',
								title: '申请成功，等待审核'
							});
							uni.hideNavigationBarLoading(); //关闭加载动画
							uni.hideLoading()
							uni.navigateBack()
							// _this.$refer.setVilit('/packageUser/pages/user/business_enter/apply_status')
							// let callback = function(url) {
							// 	_this.$refs.popupvLogin.open()
							// }
							// let data = {
							// company_name:_this.data.list.company_name,
							// mobile:_this.data.list.mobile,
							// contact_name:_this.data.list.contact_name,
							// id_card:_this.data.list.id_card,
							// email:_this.data.list.email,
							// license_image:_this.data.list.license_image
							// }
							// _this.$refer.toUrl(callback, data)
							
						} else {
							console.log(res.message)
							uni.showToast({
								icon: 'none',
								title: res.message
							});
							
							// let options = {
							// 	msg: res.message,
							// 	type: 'danger'
							// };
							// _this.$refs.toast.showTips(options);
							
						}
					}
				};
				uni.requestSubscribeMessage({
				  tmplIds: [
					  'BtpCxKrwWNJauaLMbgJxx920ejc6mieYhDn8Z-piU8M',
					  // 'PS-EKzqEghm53kiXBDF7aKDZPa_sdr9pLXMebk7TEf0',
					  // 'xZqN1yl__-vk-u78pNfVgGq_qhxgnoaodKI5LxKoVzI'
					  ],
				  success (res) {
					  console.log(2222)
					  console.log(res)
				  },
				  complete(){
					  _this.$service.GetApi(opt)
				  }
				 
				})
				
				
			},
			checkedStoreType(item){
				console.log(item)
				this.checkIndex = item.val
			},
			GetStatusBarHeight() {
				let that = this;
				wx.getSystemInfo({
					success: function(res) {
						that.statusBarHeight = (res.statusBarHeight + 44 + 15) + 'px'; //这就是状态栏的高度
						console.log(that.statusBarHeight)
					},
				});
			},
			result: function(e,name) {
				console.log(e)
				
				this.imageData = e.imgNameArr;
				this.data.list[name]=this.imageData;
				console.log(this.data.list,'******')
				// uni.setStorageSync('business_license', JSON.stringify(this.imageData));
			},
			remove: function(e,name) {
				//移除图片
				console.log(e)
				let index = e.index
				this.data.list[name].splice(index, 1);
				
			},
			bindDateChange(e,name){
				// console.log(e)
				this.data.list[name]=e.detail.value;
			},
			getList(){
				let _this = this
				var opt = {
				    url: '/User/applyEnter',
				    data:{
				       
				    },
				    success: function(res) {
				        //console.log(res)
				        if (res.status == 1) {
							_this.data.scopeList =res.data.scopeList
				          // _this.activeSteps = index
							// console.log(that.activityBanner)
						} else {
				            uni.showToast({
				                icon: 'none',
				                title: res.message
				            });
				        }
				
				    }
				};
				_this.$service.GetApi(opt)
			},
			navClick(url) {
				// console.log(url)


				let _this = this

				if (url == 'stop') {
					let options = {
						msg: '即将开放',
						type: 'danger'
					};
					_this.$refs.toast.showTips(options);
					return
				}

				this.$refer.setVilit(url)
				let callback = function(url) {

					_this.$refs.popupvLogin.open()
				}

				this.$refer.toUrl(callback)
			},
			whenChanged(e) {
				let _this =this
			                console.log(JSON.stringify(e))
			                this.data.scopeList = e
							let arr = [];
							
							this.data.scopeList.forEach(function(v){
								if(v.is_selected){
									
									arr.push(v.id)
								}
								
							})
							_this.data.list.scopeIds= arr
							console.log(this.data.list.scopeIds)
							
			},
			confirmMultiple(e) {
			                console.log(e);
			
			                let temp = [];
			                e.selected.forEach(item => {
			                    temp.push(item.label);
			                })
			                this.form.selectValue = temp.toString();
			                this.form.selectIndex = e.value;
			                this.selectMultiple.show = false;
			            },
			// 刷新的方法
			refresh() {
				//this.getList();
			},
			picker: function(e) {
					let value = e.detail.value;
					
					//console.log(value)
					if (this.selectList.length > 0) {
						
						let provice = this.selectList[value[0]].label
						console.log(this.selectList[value[0]])
						let city = this.selectList[value[0]].children[value[1]].label
						let area = this.selectList[value[0]].children[value[1]].children[value[2]].label
						this.data.text = provice + " " + city + " " + area;
						this.value = [value[0],value[1],value[2]]
						//this.id = this.selectList[value[0]].children[value[1]].children[value[2]].id
					}
				},
				columnPicker: function(e) {
					//第几列 下标从0开始
					let column = e.detail.column;
					//第几行 下标从0开始
					let value = e.detail.value;
					
					if (column === 0) {
						console.log(value)
						console.log(column)
						this.multiArray = [
							this.multiArray[0],
							this.toArr(this.selectList[value].children,2),
							this.toArr(this.selectList[value].children[0].children,3)
						];
						this.columnFirst=value;
						 this.value = [value, 0, 0]
					} else if (column === 1) {
						
						this.multiArray = [
							this.multiArray[0],
							this.multiArray[1],
							this.toArr(this.selectList[this.columnFirst].children[value].children,3)
						];
						this.columnsecond=value;
						this.value = [this.value[0], value, 0]
					}
					
					//console.log(this.value)
				},
				toArr(object,column=1) {
					let arr = [];
					console.log(object)
					for (let i in object) {
						if(column==1)
						{
							arr.push(object[i].label);
						}
						if(column==2)
						{
							arr.push(object[i].label);
						}
						if(column==3)
						{
							arr.push(object[i].label);
						}	
					
					}
					return arr;
				},
				
			
			// 跳转的方法
			swiperChange(active, url) {
				const _this = this
				uni.setStorageSync('commonBottomActive', active);
				// uni.redirectTo({
				// 		url: url
				// })
				_this.$refer.setVilit(url)
				let callback = function(url) {
					_this.$refs.popupvLogin.open()
				}
				_this.$refer.toUrl(callback, '', 'redirectTo')
			}
			
			





		}
	}
</script>
<style lang="scss">
	@import "./business_enter.scss";
</style>
